import { AppGlobalService } from 'src/app/shared/service/app-global.service';
import { PageModalService } from 'src/app/shared/service/page-modal-service';
import { Component, Input, OnInit } from '@angular/core';

@Component({
  selector: 'app-ai-search-header-tag',
  templateUrl: './ai-search-header-tag.component.html',
  styleUrls: ['./ai-search-header-tag.component.scss'],
})
export class AiSearchHeaderTagComponent implements OnInit {
  @Input() tagData: any;
  constructor(
    public pageModalService: PageModalService,
    private appGlobalService: AppGlobalService
  ) { }

  ngOnInit() {}
  back() {
    const targetObj = JSON.parse(localStorage.getItem('targetObj'));
    if (targetObj && targetObj.bat && targetObj.bat.length > 0) {
      this.appGlobalService.popTarget();
      this.appGlobalService.goBack();
    }
  }
}
